import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
import { rules } from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';

export const columns: BasicColumn[] = [
  {
    title: '供应商名称',
    dataIndex: 'areaName'
  },
  {
    title: '入库仓库',
    dataIndex: 'warehouseName'
  },
  {
    title: 'materialName',
    dataIndex: 'materialName'
  },
  {
    title: 'materialType',
    dataIndex: 'materialType'
  },
  {
    title: 'materialParentType',
    dataIndex: 'materialParentType'
  },
  {
    title: '库存单位',
    dataIndex: 'sku'
  },
  {
    title: '库存数量',
    dataIndex: 'qty'
  },
  {
    title: '单价',
    dataIndex: 'univalence'
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    label: '供应商名称',
    field: 'areaName',
    component: 'Input'
  },
  {
    label: '入库仓库',
    field: 'warehouseName',
    component: 'Input'
  },
];

export const formSchema: FormSchema[] = [
  // TODO 主键隐藏字段，目前写死为ID
  { label: '', field: 'id', component: 'Input', show: false },
  {
    label: '供应商名称',
    field: 'areaName',
    component: 'Input',
  },
  {
    label: '入库仓库',
    field: 'warehouseName',
    component: 'Input',
  },
  {
    label: 'materialName',
    field: 'materialName',
    component: 'Input',
  },
  {
    label: 'materialType',
    field: 'materialType',
    component: 'Input',
  },
  {
    label: 'materialParentType',
    field: 'materialParentType',
    component: 'Input',
  },
  {
    label: '库存单位',
    field: 'sku',
    component: 'Input',
  },
  {
    label: '库存数量',
    field: 'qty',
    component: 'Input',
  },
  {
    label: '单价',
    field: 'univalence',
    component: 'Input',
  },
];
